package com.xxx.coll;

import java.util.Iterator;
import java.util.LinkedHashSet;

/**
 * @version v1.0
 * @Description
 * @Author admin
 * @date 2021/7/21  10:36
 * @Copyright
 */
public class LinkedHashSetDome {
    public static void main(String[] args) {
        LinkedHashSet linkedHashSet = new LinkedHashSet();
        linkedHashSet.add("c");
        linkedHashSet.add("b");
        linkedHashSet.add("d");
        linkedHashSet.add("a");
        Iterator iterator = linkedHashSet.iterator();
        while (iterator.hasNext()){
            String s = (String) iterator.next();
            System.out.println("s = " + s);
        }


    }
}
